package cn.jilian.common.domain;

public class R {
	

	private Boolean success;
	
	private Object data;
	
	private String msg;
	
	public static final R ok=new R(Boolean.TRUE,null,"ok");
	
	public static final R fail=new R(Boolean.FALSE,null,"failure");
	
	public static R ok(Object data) {
		return new R(Boolean.TRUE,data,null);
	}
	
	public static R fail(String msg) {
		return new R(Boolean.FALSE,null,msg);
	}
	
	public R(Boolean success,Object data,String msg) {
		this.success=success;
		this.data=data;
		this.msg=msg;
	}

	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	
	
}
